#ifndef ENERGY_H
#define ENERGY_H

#ifndef ENERGY_SAFE_STATE
//#define ENERGY_SAFE_STATE 1
#endif

#ifndef ENERGY_ENABLE
//#define ENERGY_ENABLE 1
#endif

enum {
	ENERGY_STATE1 = 0,
	ENERGY_STATE2 = 1,
	ENERGY_STATE3 = 2,
	ENERGY_STATE4 = 3,
#ifndef ENERGY_SAFE_STATE
	ENERGY_STATE5 = 4,
	ENERGY_STATE6 = 5,
	ENERGY_STATE7 = 6,
	ENERGY_STATE8 = 7,
#endif

	ENERGY_FLAG1 = 1,
	ENERGY_FLAG2 = 2,
	ENERGY_FLAG3 = 3,
};

typedef uint8_t energy_state_t;
typedef uint8_t energy_flag_t;

#ifdef ENERGY_ENABLE
inline void energy_state(const energy_state_t state) __attribute__ ((always_inline));
inline void energy_flag(const energy_flag_t flag, const bool value) __attribute__ ((always_inline));
#else
#define energy_state(...) 
#define energy_flag(...) 
#endif

#endif /* ENERGY_H */
